// import lottie from 'vue-lottie'
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { createPinia } from "pinia" // 引入路由模块
import { createRouter, createWebHashHistory } from 'vue-router'
import routes from "./router/router"
import naive from 'naive-ui'
import axios from 'axios'


//实例化路由
const router = createRouter({
    history: createWebHashHistory(),
    routes
})

const app = createApp(App)
    //设置服务器地址
axios.defaults.baseURL = "http://10.10.233.92:3000"
    // axios.defaults.baseURL = "http://127.0.0.1:3000"

app.provide("axios", axios)
    // app.component('lottie', lottie)
app.use(createPinia()) // 启用pinia
app.use(naive) //使用naiveui
app.use(router) // 使用路由
app.mount('#app')